package classics.Singleton;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.Scanner;

/**
 * 流输入 读取文件
 */
public class Error {
    public static void main(String[] args) throws IOException {
        String filename = "/Users/asrieal/IdeaProjects/leet-code_run/src/classics/Singleton/abc";
        File file = new File(filename);
        if(file.exists()){
            BufferedReader bufferedReader = new BufferedReader(new FileReader(filename));
            String s = "";
            while((s = bufferedReader.readLine())!=null){
                try {
                    System.out.println(Integer.parseInt(s));
                }catch (Exception e){
                    continue;
                }
            }
        }
    }
}
